اینو حتماً شنیدید: توی پایتون GIL باعث میشه multi-thread واقعی نداشته باشیم.
حالا من چندتا سوال سطح بالاتر میپرسم، میخوام این سوالا رو توی مصاحبههای سطح سنیور و مید استفاده کنم :
۱- مگر نه اینکه GIL باعث میشه در لحظه فقط یک thread توی پایتون اجرا بشه؟ پس چرا کتابخونه threading داریم ؟
۲- توی یک برنامه کاملاً پایتونی ( fortran, C, ... درگیر نباشه) بنظر شما کدوم مورد سریعتر هست و چرا ؟
threading یا asynchronous
۳- حالتی به ذهنت میرسه که توی یک کد کاملا پایتونی استفاده از threading بهتر از asynchronous باشه ؟
چرا این سوالات ؟ چون خسته شدم انقدر که سختترین سوال مصاحبه این بود که؛ کی از threading استفاده کنیم کی از multi-process ؟ گفتم چندتا سوال خوب برای مصاحبه طرح کنم، البته دارم روش کار میکنم. ۴-۵ تا دیگه اضافه میشه
اینو حتماً شنیدید: توی پایتون GIL باعث میشه multi-thread واقعی نداشته باشیم.
حالا من چندتا سوال سطح بالاتر میپرسم، میخوام این سوالا رو توی مصاحبههای سطح سنیور و مید استفاده کنم :
۱- مگر نه اینکه GIL باعث میشه در لحظه فقط یک thread توی پایتون اجرا بشه؟ پس چرا کتابخونه threading داریم ؟
۲- توی یک برنامه کاملاً پایتونی ( fortran, C, ... درگیر نباشه) بنظر شما کدوم مورد سریعتر هست و چرا ؟
threading یا asynchronous
۳- حالتی به ذهنت میرسه که توی یک کد کاملا پایتونی استفاده از threading بهتر از asynchronous باشه ؟
چرا این سوالات ؟ چون خسته شدم انقدر که سختترین سوال مصاحبه این بود که؛ کی از threading استفاده کنیم کی از multi-process ؟ گفتم چندتا سوال خوب برای مصاحبه طرح کنم، البته دارم روش کار میکنم. ۴-۵ تا دیگه اضافه میشه
BY Python Hints
Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283
The campaign, which security firm Check Point has named Rampant Kitten, comprises two main components, one for Windows and the other for Android. Rampant Kitten’s objective is to steal Telegram messages, passwords, and two-factor authentication codes sent by SMS and then also take screenshots and record sounds within earshot of an infected phone, the researchers said in a post published on Friday.
How Does Bitcoin Mining Work?
Bitcoin mining is the process of adding new transactions to the Bitcoin blockchain. It’s a tough job. People who choose to mine Bitcoin use a process called proof of work, deploying computers in a race to solve mathematical puzzles that verify transactions.To entice miners to keep racing to solve the puzzles and support the overall system, the Bitcoin code rewards miners with new Bitcoins. “This is how new coins are created” and new transactions are added to the blockchain, says Okoro.